﻿@model $prjsn$.Common.Models.Services.HowTos.IComplexEntityModel

@AddControls(
    new Fieldset("w32p mh100 ", "Byte")
    {
        new DefinitionList(PercentForLabel.p60)
        {
            new TextOrInput().SetSourceProperty(() => Model.Item.ByteValue),

            new TextOrInput().SetSourceProperty(() => Model.Item.SByteValue),

            new TextOrInput().SetSourceProperty(() => Model.Item.ByteValueNullable),

            new TextOrInput().SetSourceProperty(() => Model.Item.SByteValueNullable),
        }
    },
    new Fieldset("w32p mh100 ", "Short")
    {
        new DefinitionList(PercentForLabel.p60)
        {
            new TextOrInput().SetSourceProperty(() => Model.Item.ShortValue),

            new TextOrInput().SetSourceProperty(() => Model.Item.UShortValue),

            new TextOrInput().SetSourceProperty(() => Model.Item.ShortValueNullable),

            new TextOrInput().SetSourceProperty(() => Model.Item.UShortValueNullable),
        }
    },
    new Fieldset("w32p mh100 ", "Int")
    {
        new DefinitionList(PercentForLabel.p60)
        {
            new TextOrInput().SetSourceProperty(() => Model.Item.IntValue),

            new TextOrInput().SetSourceProperty(() => Model.Item.UIntValue),

            new TextOrInput().SetSourceProperty(() => Model.Item.IntValueNullable),

            new TextOrInput().SetSourceProperty(() => Model.Item.UIntValueNullable),
        }
    })
@AddControls(
    new Fieldset("w32p mh50 ", "Long")
    {
        new DefinitionList(PercentForLabel.p60)
        {
            new TextOrInput().SetSourceProperty(() => Model.Item.LongValue),

            new TextOrInput().SetSourceProperty(() => Model.Item.ULongValue),
        }
    },
    new Fieldset("w32p mh50 ", "Long Null")
    {
        new DefinitionList(PercentForLabel.p60)
        {
            new TextOrInput().SetSourceProperty(() => Model.Item.LongValueNullable),

            new TextOrInput().SetSourceProperty(() => Model.Item.ULongValueNullable),
        }
    },
    new Fieldset("w32p mh50 ", "Date")
    {
        new DefinitionList(PercentForLabel.p60)
        {
            new TextOrInput().SetSourceProperty(() => Model.Item.ValidFrom),

            new TextOrInput().SetSourceProperty(() => Model.Item.ValidTo),
        }
    })
@AddControls(
    new Fieldset("w32p mh50 ", "Float")
    {
        new DefinitionList(PercentForLabel.p40)
        {
            new DefinitionListItem("Float")
            {
                new TextOrInput()
                    .SetSourceProperty(() => Model.Item.FloatValue)
                    .SetFormat("N4"),
            },
            new DefinitionListItem("Float Null")
            {
                new TextOrInput()
                    .SetSourceProperty(() => Model.Item.FloatValueNullable)
                    .SetFormat("N4"),
            },
        }
    },
    new Fieldset("w32p mh50 ", "Double")
    {
        new DefinitionList(PercentForLabel.p40)
        {
            new DefinitionListItem("Double")
            {
                new TextOrInput()
                    .SetSourceProperty(() => Model.Item.DoubleValue)
                    .SetFormat("N6"),
            },
            new DefinitionListItem("Double Null")
            {
                new TextOrInput()
                    .SetSourceProperty(() => Model.Item.DoubleValueNullable)
                    .SetFormat("N6"),
            },
        }
    },
    new Fieldset("w32p mh50 ", "Decimal")
    {
        new DefinitionList(PercentForLabel.p40)
        {
            new DefinitionListItem("Decimal")
            {
                new TextOrInput()
                    .SetSourceProperty(() => Model.Item.DecimalValue)
                    .SetFormat("N8"),
            },
            new DefinitionListItem("Decimal Null")
            {
                new TextOrInput()
                    .SetSourceProperty(() => Model.Item.DecimalValueNullable)
                    .SetFormat("N8"),
            },
        }
    })
@AddControls(
    new Fieldset("w57p mh50 ", "Guid")
    {
        new DefinitionList(PercentForLabel.p30)
        {
            new TextOrInput()
                .SetSourceProperty(() => Model.Item.GuidValue)
                .SetFormat("D"),

            new TextOrInput()
                .SetSourceProperty(() => Model.Item.GuidValueNullable)
                .SetFormat("N"),
        }
    })